import request from '@/utils/request'

// 查询车位出租列表
export function listSpots(query) {
  return request({
    url: '/parking/spots/list',
    method: 'get',
    params: query
  })
}

// 查询车位出租详细
export function getSpots(id) {
  return request({
    url: '/parking/spots/' + id,
    method: 'get'
  })
}

// 新增车位出租
export function addSpots(data) {
  return request({
    url: '/parking/spots',
    method: 'post',
    data: data
  })
}

// 修改车位出租
export function updateSpots(data) {
  return request({
    url: '/parking/spots',
    method: 'put',
    data: data
  })
}

// 删除车位出租
export function delSpots(id) {
  return request({
    url: '/parking/spots/' + id,
    method: 'delete'
  })
}
